<%@page import="java.util.ArrayList"%>
<%@page import="com.smvc.entities.City"%>
<%@page import="java.util.List"%>
<%@page import="java.util.HashMap"%>
<%@page import="java.util.Map"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" isELIgnored="false"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
	<%
		Map<String,String> genders = new HashMap<String,String>();
		genders.put("1", "男");
		genders.put("2", "女");
		request.setAttribute("genders", genders);
		
		Map<String,String> hobbies = new HashMap<String,String>();
		hobbies.put("1", "玩游戏");
		hobbies.put("2", "上网");
		hobbies.put("3", "泡妞");
		hobbies.put("4", "打篮球");
		request.setAttribute("hobbies", hobbies);
		
		List<City> cities = new ArrayList<City>();
		cities.add(new City(1,"武汉"));
		cities.add(new City(2,"北京"));
		cities.add(new City(3,"十堰"));
		request.setAttribute("cities", cities);
	%>

	<form:form modelAttribute="user">
		姓名:<form:input path="name"/><br>
		密码:<form:password path="pwd"/><br>
		性别:<form:radiobuttons path="gender" items="${genders }"/><br>
		爱好:<form:checkboxes items="${hobbies }" path="hobby"/><br>
		城市:<form:select path="city" items="${cities }" itemLabel="cityName" itemValue="cityId"></form:select><br>
		自我评价:<form:textarea path="desci"/>	<br>
		<input type="submit" value="提交">
	</form:form>
</body>
</html>